\(\int \frac {\csc ^7(x)}{i+\cot (x)} \, dx\) [11]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 40 \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=\frac {3}{8} i \text {arctanh}(\cos (x))+\frac {3}{8} i \cot (x) \csc (x)+\frac {1}{4} i \cot (x) \csc ^3(x)-\frac {\csc ^5(x)}{5} \]

[Out]

3/8*I*arctanh(cos(x))+3/8*I*cot(x)*csc(x)+1/4*I*cot(x)*csc(x)^3-1/5*csc(x)^5

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3582, 3853, 3855} \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=\frac {3}{8} i \text {arctanh}(\cos (x))-\frac {1}{5} \csc ^5(x)+\frac {1}{4} i \cot (x) \csc ^3(x)+\frac {3}{8} i \cot (x) \csc (x) \]

[In]

Int[Csc[x]^7/(I + Cot[x]),x]

[Out]

((3*I)/8)*ArcTanh[Cos[x]] + ((3*I)/8)*Cot[x]*Csc[x] + (I/4)*Cot[x]*Csc[x]^3 - Csc[x]^5/5

Rule 3582

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[d^2*(
d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + n - 1))), x] + Dist[d^2*((m - 2)/(a*(m + n - 1
))), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2
 + b^2, 0] && LtQ[n, 0] && GtQ[m, 1] &&  !ILtQ[m + n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{5} \csc ^5(x)-i \int \csc ^5(x) \, dx \\ & = \frac {1}{4} i \cot (x) \csc ^3(x)-\frac {\csc ^5(x)}{5}-\frac {3}{4} i \int \csc ^3(x) \, dx \\ & = \frac {3}{8} i \cot (x) \csc (x)+\frac {1}{4} i \cot (x) \csc ^3(x)-\frac {\csc ^5(x)}{5}-\frac {3}{8} i \int \csc (x) \, dx \\ & = \frac {3}{8} i \text {arctanh}(\cos (x))+\frac {3}{8} i \cot (x) \csc (x)+\frac {1}{4} i \cot (x) \csc ^3(x)-\frac {\csc ^5(x)}{5} \\ \end{align*}

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(99\) vs. \(2(40)=80\).

Time = 0.32 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.48 \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=\frac {1}{640} i \csc ^5(x) \left (128 i+150 \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \sin (x)+140 \sin (2 x)-75 \log \left (\cos \left (\frac {x}{2}\right )\right ) \sin (3 x)+75 \log \left (\sin \left (\frac {x}{2}\right )\right ) \sin (3 x)-30 \sin (4 x)+15 \log \left (\cos \left (\frac {x}{2}\right )\right ) \sin (5 x)-15 \log \left (\sin \left (\frac {x}{2}\right )\right ) \sin (5 x)\right ) \]

[In]

Integrate[Csc[x]^7/(I + Cot[x]),x]

[Out]

(I/640)*Csc[x]^5*(128*I + 150*(Log[Cos[x/2]] - Log[Sin[x/2]])*Sin[x] + 140*Sin[2*x] - 75*Log[Cos[x/2]]*Sin[3*x
] + 75*Log[Sin[x/2]]*Sin[3*x] - 30*Sin[4*x] + 15*Log[Cos[x/2]]*Sin[5*x] - 15*Log[Sin[x/2]]*Sin[5*x])

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (29 ) = 58\).

Time = 0.16 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.80

method result size
risch \(-\frac {i \left (15 \,{\mathrm e}^{9 i x}-70 \,{\mathrm e}^{7 i x}+128 \,{\mathrm e}^{5 i x}+70 \,{\mathrm e}^{3 i x}-15 \,{\mathrm e}^{i x}\right )}{20 \left ({\mathrm e}^{2 i x}-1\right )^{5}}-\frac {3 i \ln \left ({\mathrm e}^{i x}-1\right )}{8}+\frac {3 i \ln \left ({\mathrm e}^{i x}+1\right )}{8}\) \(72\)
default \(-\frac {\tan \left (\frac {x}{2}\right )}{16}-\frac {\tan \left (\frac {x}{2}\right )^{5}}{160}-\frac {i \tan \left (\frac {x}{2}\right )^{4}}{64}-\frac {\tan \left (\frac {x}{2}\right )^{3}}{32}-\frac {i \tan \left (\frac {x}{2}\right )^{2}}{8}+\frac {i}{8 \tan \left (\frac {x}{2}\right )^{2}}-\frac {1}{160 \tan \left (\frac {x}{2}\right )^{5}}-\frac {3 i \ln \left (\tan \left (\frac {x}{2}\right )\right )}{8}+\frac {i}{64 \tan \left (\frac {x}{2}\right )^{4}}-\frac {1}{32 \tan \left (\frac {x}{2}\right )^{3}}-\frac {1}{16 \tan \left (\frac {x}{2}\right )}\) \(92\)

[In]

int(csc(x)^7/(I+cot(x)),x,method=_RETURNVERBOSE)

[Out]

-1/20*I/(exp(2*I*x)-1)^5*(15*exp(9*I*x)-70*exp(7*I*x)+128*exp(5*I*x)+70*exp(3*I*x)-15*exp(I*x))-3/8*I*ln(exp(I
*x)-1)+3/8*I*ln(exp(I*x)+1)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 147 vs. \(2 (26) = 52\).

Time = 0.29 (sec) , antiderivative size = 147, normalized size of antiderivative = 3.68 \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=-\frac {15 \, {\left (-i \, e^{\left (10 i \, x\right )} + 5 i \, e^{\left (8 i \, x\right )} - 10 i \, e^{\left (6 i \, x\right )} + 10 i \, e^{\left (4 i \, x\right )} - 5 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) + 15 \, {\left (i \, e^{\left (10 i \, x\right )} - 5 i \, e^{\left (8 i \, x\right )} + 10 i \, e^{\left (6 i \, x\right )} - 10 i \, e^{\left (4 i \, x\right )} + 5 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) + 30 i \, e^{\left (9 i \, x\right )} - 140 i \, e^{\left (7 i \, x\right )} + 256 i \, e^{\left (5 i \, x\right )} + 140 i \, e^{\left (3 i \, x\right )} - 30 i \, e^{\left (i \, x\right )}}{40 \, {\left (e^{\left (10 i \, x\right )} - 5 \, e^{\left (8 i \, x\right )} + 10 \, e^{\left (6 i \, x\right )} - 10 \, e^{\left (4 i \, x\right )} + 5 \, e^{\left (2 i \, x\right )} - 1\right )}} \]

[In]

integrate(csc(x)^7/(I+cot(x)),x, algorithm="fricas")

[Out]

-1/40*(15*(-I*e^(10*I*x) + 5*I*e^(8*I*x) - 10*I*e^(6*I*x) + 10*I*e^(4*I*x) - 5*I*e^(2*I*x) + I)*log(e^(I*x) +
1) + 15*(I*e^(10*I*x) - 5*I*e^(8*I*x) + 10*I*e^(6*I*x) - 10*I*e^(4*I*x) + 5*I*e^(2*I*x) - I)*log(e^(I*x) - 1)
+ 30*I*e^(9*I*x) - 140*I*e^(7*I*x) + 256*I*e^(5*I*x) + 140*I*e^(3*I*x) - 30*I*e^(I*x))/(e^(10*I*x) - 5*e^(8*I*
x) + 10*e^(6*I*x) - 10*e^(4*I*x) + 5*e^(2*I*x) - 1)

Sympy [F(-1)]

Timed out. \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=\text {Timed out} \]

[In]

integrate(csc(x)**7/(I+cot(x)),x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 131 vs. \(2 (26) = 52\).

Time = 0.22 (sec) , antiderivative size = 131, normalized size of antiderivative = 3.28 \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=\frac {{\left (\frac {5 i \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {10 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {40 i \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac {20 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - 2\right )} {\left (\cos \left (x\right ) + 1\right )}^{5}}{320 \, \sin \left (x\right )^{5}} - \frac {\sin \left (x\right )}{16 \, {\left (\cos \left (x\right ) + 1\right )}} - \frac {i \, \sin \left (x\right )^{2}}{8 \, {\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {\sin \left (x\right )^{3}}{32 \, {\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac {i \, \sin \left (x\right )^{4}}{64 \, {\left (\cos \left (x\right ) + 1\right )}^{4}} - \frac {\sin \left (x\right )^{5}}{160 \, {\left (\cos \left (x\right ) + 1\right )}^{5}} - \frac {3}{8} i \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]

[In]

integrate(csc(x)^7/(I+cot(x)),x, algorithm="maxima")

[Out]

1/320*(5*I*sin(x)/(cos(x) + 1) - 10*sin(x)^2/(cos(x) + 1)^2 + 40*I*sin(x)^3/(cos(x) + 1)^3 - 20*sin(x)^4/(cos(
x) + 1)^4 - 2)*(cos(x) + 1)^5/sin(x)^5 - 1/16*sin(x)/(cos(x) + 1) - 1/8*I*sin(x)^2/(cos(x) + 1)^2 - 1/32*sin(x
)^3/(cos(x) + 1)^3 - 1/64*I*sin(x)^4/(cos(x) + 1)^4 - 1/160*sin(x)^5/(cos(x) + 1)^5 - 3/8*I*log(sin(x)/(cos(x)
 + 1))

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 94 vs. \(2 (26) = 52\).

Time = 0.26 (sec) , antiderivative size = 94, normalized size of antiderivative = 2.35 \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=-\frac {1}{160} \, \tan \left (\frac {1}{2} \, x\right )^{5} - \frac {1}{64} i \, \tan \left (\frac {1}{2} \, x\right )^{4} - \frac {1}{32} \, \tan \left (\frac {1}{2} \, x\right )^{3} - \frac {1}{8} i \, \tan \left (\frac {1}{2} \, x\right )^{2} - \frac {-274 i \, \tan \left (\frac {1}{2} \, x\right )^{5} + 20 \, \tan \left (\frac {1}{2} \, x\right )^{4} - 40 i \, \tan \left (\frac {1}{2} \, x\right )^{3} + 10 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 5 i \, \tan \left (\frac {1}{2} \, x\right ) + 2}{320 \, \tan \left (\frac {1}{2} \, x\right )^{5}} - \frac {3}{8} i \, \log \left (\tan \left (\frac {1}{2} \, x\right )\right ) - \frac {1}{16} \, \tan \left (\frac {1}{2} \, x\right ) \]

[In]

integrate(csc(x)^7/(I+cot(x)),x, algorithm="giac")

[Out]

-1/160*tan(1/2*x)^5 - 1/64*I*tan(1/2*x)^4 - 1/32*tan(1/2*x)^3 - 1/8*I*tan(1/2*x)^2 - 1/320*(-274*I*tan(1/2*x)^
5 + 20*tan(1/2*x)^4 - 40*I*tan(1/2*x)^3 + 10*tan(1/2*x)^2 - 5*I*tan(1/2*x) + 2)/tan(1/2*x)^5 - 3/8*I*log(tan(1
/2*x)) - 1/16*tan(1/2*x)

Mupad [B] (verification not implemented)

Time = 12.47 (sec) , antiderivative size = 89, normalized size of antiderivative = 2.22 \[ \int \frac {\csc ^7(x)}{i+\cot (x)} \, dx=-\frac {\mathrm {cot}\left (\frac {x}{2}\right )}{16}-\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{16}-\frac {{\mathrm {cot}\left (\frac {x}{2}\right )}^3}{32}-\frac {{\mathrm {cot}\left (\frac {x}{2}\right )}^5}{160}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{32}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^5}{160}-\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,3{}\mathrm {i}}{8}+\frac {{\mathrm {cot}\left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}}{8}+\frac {{\mathrm {cot}\left (\frac {x}{2}\right )}^4\,1{}\mathrm {i}}{64}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,1{}\mathrm {i}}{8}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,1{}\mathrm {i}}{64} \]

[In]

int(1/(sin(x)^7*(cot(x) + 1i)),x)

[Out]

(cot(x/2)^2*1i)/8 - tan(x/2)/16 - (log(tan(x/2))*3i)/8 - cot(x/2)/16 - cot(x/2)^3/32 + (cot(x/2)^4*1i)/64 - co
t(x/2)^5/160 - (tan(x/2)^2*1i)/8 - tan(x/2)^3/32 - (tan(x/2)^4*1i)/64 - tan(x/2)^5/160